diff --git a/py/builtin.c b/py/builtin.c
index 281c57dd437920e99c214ea08397ce64382fc221..1e022becbd0e3025077d589bd981ce44bec5e8b3 100644
--- a/py/builtin.c
+++ b/py/builtin.c
@@ -178,8 +178,8 @@ STATIC mp_obj_t mp_builtin_dir(uint n_args, const mp_obj_t *args) {
         }
     }
     if (meth != NULL) {
-        for (; meth->name != NULL; meth++) {
-            mp_obj_list_append(dir, MP_OBJ_NEW_QSTR(qstr_from_str(meth->name)));
+        for (; meth->name != MP_QSTR_NULL; meth++) {
+            mp_obj_list_append(dir, MP_OBJ_NEW_QSTR(meth->name));
         }
     }
     return dir;
diff --git a/py/obj.h b/py/obj.h
index 7c3ef8c55bea5c41714b81677ce8f06143dc56ea..1c22e956b88f97750eada72b1ccd691002fbb91c 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -96,7 +96,7 @@ typedef bool (*mp_store_attr_fun_t)(mp_obj_t self_in, qstr attr, mp_obj_t value)
 typedef bool (*mp_store_item_fun_t)(mp_obj_t self_in, mp_obj_t index, mp_obj_t value); // return true if store succeeded
 
 typedef struct _mp_method_t {
-    const char *name;
+    qstr name;
     mp_const_obj_t fun;
 } mp_method_t;
 
diff --git a/py/objarray.c b/py/objarray.c
index d77a10107549fdadfbd7cfca83e41049829e74be..9d795c1bffce0442a27753785d7d21453713bdcd 100644
--- a/py/objarray.c
+++ b/py/objarray.c
@@ -150,8 +150,8 @@ STATIC machine_int_t array_get_buffer(mp_obj_t o_in, buffer_info_t *bufinfo, int
 }
 
 STATIC const mp_method_t array_type_methods[] = {
-    { "append", &array_append_obj },
-    { NULL, NULL },
+    { MP_QSTR_append, &array_append_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t mp_type_array = {
diff --git a/py/objdict.c b/py/objdict.c
index ead2d7442f20d6cf9dd6a16aea7ceecf111cb4ae..14d120a779d947764dc80b009bb94c0decd1c386 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -424,18 +424,18 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(dict_values_obj, dict_values);
 /* dict constructors & public C API                                           */
 
 STATIC const mp_method_t dict_type_methods[] = {
-    { "clear", &dict_clear_obj },
-    { "copy", &dict_copy_obj },
-    { "fromkeys", &dict_fromkeys_obj },
-    { "get", &dict_get_obj },
-    { "items", &dict_items_obj },
-    { "keys", &dict_keys_obj },
-    { "pop", &dict_pop_obj },
-    { "popitem", &dict_popitem_obj },
-    { "setdefault", &dict_setdefault_obj },
-    { "update", &dict_update_obj },
-    { "values", &dict_values_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_clear, &dict_clear_obj },
+    { MP_QSTR_copy, &dict_copy_obj },
+    { MP_QSTR_fromkeys, &dict_fromkeys_obj },
+    { MP_QSTR_get, &dict_get_obj },
+    { MP_QSTR_items, &dict_items_obj },
+    { MP_QSTR_keys, &dict_keys_obj },
+    { MP_QSTR_pop, &dict_pop_obj },
+    { MP_QSTR_popitem, &dict_popitem_obj },
+    { MP_QSTR_setdefault, &dict_setdefault_obj },
+    { MP_QSTR_update, &dict_update_obj },
+    { MP_QSTR_values, &dict_values_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t dict_type = {
diff --git a/py/objgenerator.c b/py/objgenerator.c
index 7b4c320f75224a74be3cf70cc3373b513d2608ba..f440923ee6bf3b88e6e66e1d0632b6d7414ff780 100644
--- a/py/objgenerator.c
+++ b/py/objgenerator.c
@@ -193,10 +193,10 @@ STATIC mp_obj_t gen_instance_close(mp_obj_t self_in) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(gen_instance_close_obj, gen_instance_close);
 
 STATIC const mp_method_t gen_type_methods[] = {
-    { "close", &gen_instance_close_obj },
-    { "send", &gen_instance_send_obj },
-    { "throw", &gen_instance_throw_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_close, &gen_instance_close_obj },
+    { MP_QSTR_send, &gen_instance_send_obj },
+    { MP_QSTR_throw, &gen_instance_throw_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t gen_instance_type = {
diff --git a/py/objlist.c b/py/objlist.c
index 3083e23bb1fc3e2ed08293d3587bf02cfa07cf15..afc4f3cf855b1cda98de2b55f226ee3af602be78 100644
--- a/py/objlist.c
+++ b/py/objlist.c
@@ -329,18 +329,18 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_reverse_obj, list_reverse);
 STATIC MP_DEFINE_CONST_FUN_OBJ_KW(list_sort_obj, 0, mp_obj_list_sort);
 
 STATIC const mp_method_t list_type_methods[] = {
-    { "append", &list_append_obj },
-    { "clear", &list_clear_obj },
-    { "copy", &list_copy_obj },
-    { "count", &list_count_obj },
-    { "extend", &list_extend_obj },
-    { "index", &list_index_obj },
-    { "insert", &list_insert_obj },
-    { "pop", &list_pop_obj },
-    { "remove", &list_remove_obj },
-    { "reverse", &list_reverse_obj },
-    { "sort", &list_sort_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_append, &list_append_obj },
+    { MP_QSTR_clear, &list_clear_obj },
+    { MP_QSTR_copy, &list_copy_obj },
+    { MP_QSTR_count, &list_count_obj },
+    { MP_QSTR_extend, &list_extend_obj },
+    { MP_QSTR_index, &list_index_obj },
+    { MP_QSTR_insert, &list_insert_obj },
+    { MP_QSTR_pop, &list_pop_obj },
+    { MP_QSTR_remove, &list_remove_obj },
+    { MP_QSTR_reverse, &list_reverse_obj },
+    { MP_QSTR_sort, &list_sort_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t list_type = {
diff --git a/py/objset.c b/py/objset.c
index 4f0776f893aa86e2f7c5d421acc48751768d4d4e..250d1324722d7991903f24ecf219179e91b52bcc 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -424,24 +424,24 @@ STATIC mp_obj_t set_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
 
 
 STATIC const mp_method_t set_type_methods[] = {
-    { "add", &set_add_obj },
-    { "clear", &set_clear_obj },
-    { "copy", &set_copy_obj },
-    { "discard", &set_discard_obj },
-    { "difference", &set_diff_obj },
-    { "difference_update", &set_diff_update_obj },
-    { "intersection", &set_intersect_obj },
-    { "intersection_update", &set_intersect_update_obj },
-    { "isdisjoint", &set_isdisjoint_obj },
-    { "issubset", &set_issubset_obj },
-    { "issuperset", &set_issuperset_obj },
-    { "pop", &set_pop_obj },
-    { "remove", &set_remove_obj },
-    { "symmetric_difference", &set_symmetric_difference_obj },
-    { "symmetric_difference_update", &set_symmetric_difference_update_obj },
-    { "union", &set_union_obj },
-    { "update", &set_update_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_add, &set_add_obj },
+    { MP_QSTR_clear, &set_clear_obj },
+    { MP_QSTR_copy, &set_copy_obj },
+    { MP_QSTR_discard, &set_discard_obj },
+    { MP_QSTR_difference, &set_diff_obj },
+    { MP_QSTR_difference_update, &set_diff_update_obj },
+    { MP_QSTR_intersection, &set_intersect_obj },
+    { MP_QSTR_intersection_update, &set_intersect_update_obj },
+    { MP_QSTR_isdisjoint, &set_isdisjoint_obj },
+    { MP_QSTR_issubset, &set_issubset_obj },
+    { MP_QSTR_issuperset, &set_issuperset_obj },
+    { MP_QSTR_pop, &set_pop_obj },
+    { MP_QSTR_remove, &set_remove_obj },
+    { MP_QSTR_symmetric_difference, &set_symmetric_difference_obj },
+    { MP_QSTR_symmetric_difference_update, &set_symmetric_difference_update_obj },
+    { MP_QSTR_union, &set_union_obj },
+    { MP_QSTR_update, &set_update_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t set_type = {
diff --git a/py/objstr.c b/py/objstr.c
index 3ace7b051a1d39539a0b9dff8b548b4a1cda6aa3..d8b391d4463a26ed13cab5630b3730a43b1f417f 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -694,18 +694,18 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_partition_obj, str_partition);
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_rpartition_obj, str_rpartition);
 
 STATIC const mp_method_t str_type_methods[] = {
-    { "find", &str_find_obj },
-    { "rfind", &str_rfind_obj },
-    { "join", &str_join_obj },
-    { "split", &str_split_obj },
-    { "startswith", &str_startswith_obj },
-    { "strip", &str_strip_obj },
-    { "format", &str_format_obj },
-    { "replace", &str_replace_obj },
-    { "count", &str_count_obj },
-    { "partition", &str_partition_obj },
-    { "rpartition", &str_rpartition_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_find, &str_find_obj },
+    { MP_QSTR_rfind, &str_rfind_obj },
+    { MP_QSTR_join, &str_join_obj },
+    { MP_QSTR_split, &str_split_obj },
+    { MP_QSTR_startswith, &str_startswith_obj },
+    { MP_QSTR_strip, &str_strip_obj },
+    { MP_QSTR_format, &str_format_obj },
+    { MP_QSTR_replace, &str_replace_obj },
+    { MP_QSTR_count, &str_count_obj },
+    { MP_QSTR_partition, &str_partition_obj },
+    { MP_QSTR_rpartition, &str_rpartition_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t str_type = {
diff --git a/py/objtuple.c b/py/objtuple.c
index 68f5abefdf2cd3300d8074af615f83df46580d53..334cf0562e55e62dec61912f20c06cef4450bbf8 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -166,9 +166,9 @@ STATIC mp_obj_t tuple_index(uint n_args, const mp_obj_t *args) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(tuple_index_obj, 2, 4, tuple_index);
 
 STATIC const mp_method_t tuple_type_methods[] = {
-    { "count", &tuple_count_obj },
-    { "index", &tuple_index_obj },
-    { NULL, NULL }, // end-of-list sentinel
+    { MP_QSTR_count, &tuple_count_obj },
+    { MP_QSTR_index, &tuple_index_obj },
+    { MP_QSTR_NULL, NULL }, // end-of-list sentinel
 };
 
 const mp_obj_type_t tuple_type = {
diff --git a/py/objtype.c b/py/objtype.c
index 9cb29744c73f23e49a2a8a606176a0866b21ccf0..ceec78ea3719a2e34211588a5a7297a871ec0caa 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -41,8 +41,8 @@ STATIC mp_obj_t mp_obj_class_lookup(const mp_obj_type_t *type, qstr attr) {
         } else if (type->methods != NULL) {
             // search methods (the const set of methods)
 
-            for (const mp_method_t *meth = type->methods; meth->name != NULL; meth++) {
-                if (strcmp(meth->name, qstr_str(attr)) == 0) {
+            for (const mp_method_t *meth = type->methods; meth->name != MP_QSTR_NULL; meth++) {
+                if (meth->name == attr) {
                     return (mp_obj_t)meth->fun;
                 }
             }
diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index 1c8afe797df9605e714b28541fd78e24da6f9885..a2cdf842518a5d91af258be4ad88b72bb0ccc0f6 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -123,7 +123,26 @@ Q(type)
 Q(value)
 Q(zip)
 
+Q(clear)
+Q(copy)
+Q(fromkeys)
+Q(get)
+Q(items)
+Q(keys)
+Q(pop)
+Q(popitem)
+Q(setdefault)
+Q(update)
+Q(values)
 Q(append)
+Q(close)
+Q(send)
+Q(throw)
+Q(count)
+Q(extend)
+Q(index)
+Q(remove)
+Q(insert)
 Q(pop)
 Q(sort)
 Q(join)
@@ -131,6 +150,30 @@ Q(strip)
 Q(format)
 Q(key)
 Q(reverse)
+Q(add)
+Q(clear)
+Q(copy)
+Q(discard)
+Q(difference)
+Q(difference_update)
+Q(intersection)
+Q(intersection_update)
+Q(isdisjoint)
+Q(issubset)
+Q(issuperset)
+Q(pop)
+Q(remove)
+Q(symmetric_difference)
+Q(symmetric_difference_update)
+Q(union)
+Q(update)
+Q(find)
+Q(rfind)
+Q(split)
+Q(startswith)
+Q(replace)
+Q(partition)
+Q(rpartition)
 
 Q(bound_method)
 Q(closure)
diff --git a/py/runtime.c b/py/runtime.c
index cc5398552e78f58ed2065f33f33794c45d7ecc37..247a78fe1a2e09c5d0d891e7d5e26dbbfbe2b868 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -847,8 +847,8 @@ STATIC void rt_load_method_maybe(mp_obj_t base, qstr attr, mp_obj_t *dest) {
             // this is a lookup in the object (ie not class or type)
             const mp_method_t *meth = type->methods;
             if (meth != NULL) {
-                for (; meth->name != NULL; meth++) {
-                    if (strcmp(meth->name, qstr_str(attr)) == 0) {
+                for (; meth->name != MP_QSTR_NULL; meth++) {
+                    if (meth->name == attr) {
                         // check if the methods are functions, static or class methods
                         // see http://docs.python.org/3.3/howto/descriptor.html
                         if (MP_OBJ_IS_TYPE(meth->fun, &mp_type_staticmethod)) {
diff --git a/stm/adc.c b/stm/adc.c
index e50b3bf663bc4df53aa50f4cab6337aea5d84f50..07067875792c56983764b54d75778ae73a17a2c8 100644
--- a/stm/adc.c
+++ b/stm/adc.c
@@ -324,11 +324,11 @@ static MP_DEFINE_CONST_FUN_OBJ_1(adc_all_read_core_vbat_obj, adc_all_read_core_v
 static MP_DEFINE_CONST_FUN_OBJ_1(adc_all_read_core_vref_obj, adc_all_read_core_vref);
 
 static const mp_method_t adc_all_methods[] = {
-    { "read_channel",   &adc_all_read_channel_obj},
-    { "read_core_temp", &adc_all_read_core_temp_obj},
-    { "read_core_vbat", &adc_all_read_core_vbat_obj},
-    { "read_core_vref", &adc_all_read_core_vref_obj},
-    { NULL, NULL },
+    { MP_QSTR_read_channel,   &adc_all_read_channel_obj},
+    { MP_QSTR_read_core_temp, &adc_all_read_core_temp_obj},
+    { MP_QSTR_read_core_vbat, &adc_all_read_core_vbat_obj},
+    { MP_QSTR_read_core_vref, &adc_all_read_core_vref_obj},
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t adc_all_type = {
@@ -381,8 +381,8 @@ static mp_obj_t adc_read(mp_obj_t self_in) {
 static MP_DEFINE_CONST_FUN_OBJ_1(adc_read_obj, adc_read);
 
 static const mp_method_t adc_methods[] = {
-    { "read", &adc_read_obj},
-    { NULL, NULL },
+    { MP_QSTR_read, &adc_read_obj},
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t adc_type = {
diff --git a/stm/audio.c b/stm/audio.c
index 77337282af10e406566bb795834089689c493248..5523087ec889959842ea26de546d1a205fe4501c 100644
--- a/stm/audio.c
+++ b/stm/audio.c
@@ -194,11 +194,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(pyb_audio_dac_obj, pyb_audio_dac);
 STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_audio_dma_obj, 3, pyb_audio_dma);
 
 STATIC const mp_method_t pyb_audio_methods[] = {
-    { "noise", &pyb_audio_noise_obj },
-    { "triangle", &pyb_audio_triangle_obj },
-    { "dac", &pyb_audio_dac_obj },
-    { "dma", &pyb_audio_dma_obj },
-    { NULL, NULL },
+    { MP_QSTR_noise, &pyb_audio_noise_obj },
+    { MP_QSTR_triangle, &pyb_audio_triangle_obj },
+    { MP_QSTR_dac, &pyb_audio_dac_obj },
+    { MP_QSTR_dma, &pyb_audio_dma_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 STATIC const mp_obj_type_t pyb_audio_type = {
diff --git a/stm/exti.c b/stm/exti.c
index fa21eae8a3787c25d39795146e050124ba2e21db..1484b622eca99177bb4a613083990d4aac84bc41 100644
--- a/stm/exti.c
+++ b/stm/exti.c
@@ -227,11 +227,11 @@ static MP_DEFINE_CONST_FUN_OBJ_1(exti_obj_disable_obj, exti_obj_disable);
 static MP_DEFINE_CONST_FUN_OBJ_1(exti_obj_swint_obj,   exti_obj_swint);
 
 static const mp_method_t exti_methods[] = {
-    { "line",  &exti_obj_line_obj },
-    { "enable",  &exti_obj_enable_obj },
-    { "disable",  &exti_obj_disable_obj },
-    { "swint",  &exti_obj_swint_obj },
-    { NULL, NULL },
+    { MP_QSTR_line,  &exti_obj_line_obj },
+    { MP_QSTR_enable,  &exti_obj_enable_obj },
+    { MP_QSTR_disable,  &exti_obj_disable_obj },
+    { MP_QSTR_swint,  &exti_obj_swint_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static mp_obj_t exti_regs(void) {
diff --git a/stm/file.c b/stm/file.c
index 283159a69b42d3577a86f73195e50b7f6043607d..e56b05faeb2c65200c61fc65292d989eada41077 100644
--- a/stm/file.c
+++ b/stm/file.c
@@ -53,10 +53,10 @@ static MP_DEFINE_CONST_FUN_OBJ_1(file_obj_close_obj, file_obj_close);
 // TODO gc hook to close the file if not already closed
 
 static const mp_method_t file_methods[] = {
-    { "read", &file_obj_read_obj },
-    { "write", &file_obj_write_obj },
-    { "close", &file_obj_close_obj },
-    {NULL, NULL},
+    { MP_QSTR_read, &file_obj_read_obj },
+    { MP_QSTR_write, &file_obj_write_obj },
+    { MP_QSTR_close, &file_obj_close_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t file_obj_type = {
diff --git a/stm/i2c.c b/stm/i2c.c
index 33d9a43f3a8d9aa0a0001b6468319d01c81184d3..4d726c9593d0aaec032ab2f6a92ffdfda85e0cba 100644
--- a/stm/i2c.c
+++ b/stm/i2c.c
@@ -326,12 +326,12 @@ static MP_DEFINE_CONST_FUN_OBJ_1(i2c_obj_readAndStop_obj, i2c_obj_readAndStop);
 static MP_DEFINE_CONST_FUN_OBJ_1(i2c_obj_stop_obj, i2c_obj_stop);
 
 static const mp_method_t i2c_methods[] = {
-    { "start", &i2c_obj_start_obj },
-    { "write", &i2c_obj_write_obj },
-    { "read", &i2c_obj_read_obj },
-    { "readAndStop", &i2c_obj_readAndStop_obj },
-    { "stop", &i2c_obj_stop_obj },
-    { NULL, NULL },
+    { MP_QSTR_start, &i2c_obj_start_obj },
+    { MP_QSTR_write, &i2c_obj_write_obj },
+    { MP_QSTR_read, &i2c_obj_read_obj },
+    { MP_QSTR_readAndStop, &i2c_obj_readAndStop_obj },
+    { MP_QSTR_stop, &i2c_obj_stop_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t i2c_obj_type = {
diff --git a/stm/led.c b/stm/led.c
index aa74dfe2f20a80cc4ce565fdc9e40d9a4b9d3080..ceae49ca73c3604b5cff7a6017295593d060bde7 100644
--- a/stm/led.c
+++ b/stm/led.c
@@ -110,10 +110,10 @@ static MP_DEFINE_CONST_FUN_OBJ_1(led_obj_off_obj, led_obj_off);
 static MP_DEFINE_CONST_FUN_OBJ_1(led_obj_toggle_obj, led_obj_toggle);
 
 static const mp_method_t led_methods[] = {
-    { "on", &led_obj_on_obj },
-    { "off", &led_obj_off_obj },
-    { "toggle", &led_obj_toggle_obj },
-    { NULL, NULL },
+    { MP_QSTR_on, &led_obj_on_obj },
+    { MP_QSTR_off, &led_obj_off_obj },
+    { MP_QSTR_toggle, &led_obj_toggle_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t led_obj_type = {
diff --git a/stm/pin.c b/stm/pin.c
index e7f699887475fb496dab714b0e33d3f25931c829..4bdbfcb16b2ec8ac3ff00ef86fc16157bd6eb4fc 100644
--- a/stm/pin.c
+++ b/stm/pin.c
@@ -35,10 +35,10 @@ static MP_DEFINE_CONST_FUN_OBJ_1(pin_obj_port_obj, pin_obj_port);
 static MP_DEFINE_CONST_FUN_OBJ_1(pin_obj_pin_obj, pin_obj_pin);
 
 static const mp_method_t pin_methods[] = {
-    { "name", &pin_obj_name_obj },
-    { "port", &pin_obj_port_obj },
-    { "pin", &pin_obj_pin_obj },
-    { NULL, NULL },
+    { MP_QSTR_name, &pin_obj_name_obj },
+    { MP_QSTR_port, &pin_obj_port_obj },
+    { MP_QSTR_pin, &pin_obj_pin_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pin_obj_type = {
diff --git a/stm/qstrdefsport.h b/stm/qstrdefsport.h
index 13532892a737dfb0cce035faf25c0ca00be562b4..ea2681f18e0192e6789d3c0603d856d0d8d94777 100644
--- a/stm/qstrdefsport.h
+++ b/stm/qstrdefsport.h
@@ -55,3 +55,37 @@ Q(PULL_UP)
 Q(PULL_DOWN)
 Q(PUSH_PULL)
 Q(OPEN_DRAIN)
+Q(on)
+Q(off)
+Q(toggle)
+Q(line)
+Q(enable)
+Q(disable)
+Q(swint)
+Q(read_channel)
+Q(read_core_temp)
+Q(read_core_vbat)
+Q(read_core_vref)
+Q(noise)
+Q(triangle)
+Q(dac)
+Q(dma)
+Q(present)
+Q(power)
+Q(read)
+Q(read)
+Q(write)
+Q(close)
+Q(name)
+Q(port)
+Q(pin)
+Q(angle)
+Q(start)
+Q(write)
+Q(read)
+Q(readAndStop)
+Q(stop)
+Q(status)
+Q(recv_chr)
+Q(send_chr)
+Q(send)
diff --git a/stm/sdcard.c b/stm/sdcard.c
index 0b5fdb2c87f2ff34883b83b40c30f1ea32a37daa..0898c42a5751afa909c5771a425681782b08793e 100644
--- a/stm/sdcard.c
+++ b/stm/sdcard.c
@@ -195,10 +195,10 @@ static mp_obj_t sd_read(mp_obj_t self, mp_obj_t block_num) {
 static MP_DEFINE_CONST_FUN_OBJ_2(sd_read_obj, sd_read);
 
 static const mp_method_t sdcard_methods[] = {
-    { "present", &sd_present_obj },
-    { "power", &sd_power_obj },
-    { "read", &sd_read_obj },
-    { NULL, NULL },
+    { MP_QSTR_present, &sd_present_obj },
+    { MP_QSTR_power, &sd_power_obj },
+    { MP_QSTR_read, &sd_read_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t sdcard_type = {
diff --git a/stm/servo.c b/stm/servo.c
index ae266d7f6587863cddf4d4154a7b7e3ea0c92871..cd6370b126642827b67472b2774e86ca465fa60f 100644
--- a/stm/servo.c
+++ b/stm/servo.c
@@ -147,8 +147,8 @@ STATIC mp_obj_t servo_obj_angle(mp_obj_t self_in, mp_obj_t angle) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(servo_obj_angle_obj, servo_obj_angle);
 
 STATIC const mp_method_t servo_methods[] = {
-    { "angle", &servo_obj_angle_obj },
-    { NULL, NULL },
+    { MP_QSTR_angle, &servo_obj_angle_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 STATIC const mp_obj_type_t servo_obj_type = {
diff --git a/stm/usart.c b/stm/usart.c
index ac457b61f53b8f91931d9a60e29ecaa076841ed4..41a53c2fe89ef543db6685682c90c23d541aaca3 100644
--- a/stm/usart.c
+++ b/stm/usart.c
@@ -236,11 +236,11 @@ static MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_char_obj, usart_obj_tx_char);
 static MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_str_obj, usart_obj_tx_str);
 
 STATIC const mp_method_t usart_methods[] = {
-    { "status", &usart_obj_status_obj },
-    { "recv_chr", &usart_obj_rx_char_obj },
-    { "send_chr", &usart_obj_tx_char_obj },
-    { "send", &usart_obj_tx_str_obj },
-    { NULL, NULL },
+    { MP_QSTR_status, &usart_obj_status_obj },
+    { MP_QSTR_recv_chr, &usart_obj_rx_char_obj },
+    { MP_QSTR_send_chr, &usart_obj_tx_char_obj },
+    { MP_QSTR_send, &usart_obj_tx_str_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 STATIC const mp_obj_type_t usart_obj_type = {
diff --git a/stmhal/accel.c b/stmhal/accel.c
index f79169161905700c0cf6143f2477c393f82e66e5..15782419b7683d0156a4e22deebafdede084af8a 100644
--- a/stmhal/accel.c
+++ b/stmhal/accel.c
@@ -141,32 +141,32 @@ STATIC mp_obj_t pyb_accel_filtered_xyz(mp_obj_t self_in) {
 
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_accel_filtered_xyz_obj, pyb_accel_filtered_xyz);
 
-STATIC mp_obj_t pyb_accel_read_reg(mp_obj_t self_in, mp_obj_t reg) {
+STATIC mp_obj_t pyb_accel_read(mp_obj_t self_in, mp_obj_t reg) {
     uint8_t data[1];
     HAL_I2C_Mem_Read(&I2cHandle_X, MMA_ADDR, mp_obj_get_int(reg), I2C_MEMADD_SIZE_8BIT, data, 1, 200);
     return mp_obj_new_int(data[0]);
 }
 
-MP_DEFINE_CONST_FUN_OBJ_2(pyb_accel_read_reg_obj, pyb_accel_read_reg);
+MP_DEFINE_CONST_FUN_OBJ_2(pyb_accel_read_obj, pyb_accel_read);
 
-STATIC mp_obj_t pyb_accel_write_reg(mp_obj_t self_in, mp_obj_t reg, mp_obj_t val) {
+STATIC mp_obj_t pyb_accel_write(mp_obj_t self_in, mp_obj_t reg, mp_obj_t val) {
     uint8_t data[1];
     data[0] = mp_obj_get_int(val);
     HAL_I2C_Mem_Write(&I2cHandle_X, MMA_ADDR, mp_obj_get_int(reg), I2C_MEMADD_SIZE_8BIT, data, 1, 200);
     return mp_const_none;
 }
 
-MP_DEFINE_CONST_FUN_OBJ_3(pyb_accel_write_reg_obj, pyb_accel_write_reg);
+MP_DEFINE_CONST_FUN_OBJ_3(pyb_accel_write_obj, pyb_accel_write);
 
 STATIC const mp_method_t pyb_accel_methods[] = {
-    { "x", &pyb_accel_x_obj },
-    { "y", &pyb_accel_y_obj },
-    { "z", &pyb_accel_z_obj },
-    { "tilt", &pyb_accel_tilt_obj },
-    { "filtered_xyz", &pyb_accel_filtered_xyz_obj },
-    { "read_reg", &pyb_accel_read_reg_obj },
-    { "write_reg", &pyb_accel_write_reg_obj },
-    { NULL, NULL },
+    { MP_QSTR_x, &pyb_accel_x_obj },
+    { MP_QSTR_y, &pyb_accel_y_obj },
+    { MP_QSTR_z, &pyb_accel_z_obj },
+    { MP_QSTR_tilt, &pyb_accel_tilt_obj },
+    { MP_QSTR_filtered_xyz, &pyb_accel_filtered_xyz_obj },
+    { MP_QSTR_read, &pyb_accel_read_obj },
+    { MP_QSTR_write, &pyb_accel_write_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_accel_type = {
diff --git a/stmhal/adc.c b/stmhal/adc.c
index e357a00308102cbd4e8a8baa2e2be4d292bf2dd9..7d0d3da99b911222f273e1caaf05df02d77fb570 100644
--- a/stmhal/adc.c
+++ b/stmhal/adc.c
@@ -164,8 +164,8 @@ STATIC mp_obj_t adc_read(mp_obj_t self_in) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(adc_read_obj, adc_read);
 
 STATIC const mp_method_t adc_methods[] = {
-    { "read", &adc_read_obj},
-    { NULL, NULL },
+    { MP_QSTR_read, &adc_read_obj},
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_adc_type = {
@@ -321,11 +321,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(adc_all_read_core_vbat_obj, adc_all_read_core_v
 STATIC MP_DEFINE_CONST_FUN_OBJ_1(adc_all_read_core_vref_obj, adc_all_read_core_vref);
 
 STATIC const mp_method_t adc_all_methods[] = {
-    { "read_channel",   &adc_all_read_channel_obj},
-    { "read_core_temp", &adc_all_read_core_temp_obj},
-    { "read_core_vbat", &adc_all_read_core_vbat_obj},
-    { "read_core_vref", &adc_all_read_core_vref_obj},
-    { NULL, NULL },
+    { MP_QSTR_read_channel,   &adc_all_read_channel_obj},
+    { MP_QSTR_read_core_temp, &adc_all_read_core_temp_obj},
+    { MP_QSTR_read_core_vbat, &adc_all_read_core_vbat_obj},
+    { MP_QSTR_read_core_vref, &adc_all_read_core_vref_obj},
+    { MP_QSTR_NULL, NULL },
 };
 
 STATIC const mp_obj_type_t adc_all_type = {
diff --git a/stmhal/dac.c b/stmhal/dac.c
index 3814039ccd8f65caa361f0f5551119860069a4ec..bc86e07bdf5793f1e8df5a9495018e94380fcc05 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -261,14 +261,14 @@ mp_obj_t pyb_dac_dma(uint n_args, const mp_obj_t *args, mp_map_t *kw_args) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_dac_dma_obj, 3, pyb_dac_dma);
 
 STATIC const mp_method_t pyb_dac_methods[] = {
-    { "noise", &pyb_dac_noise_obj },
-    { "triangle", &pyb_dac_triangle_obj },
-    { "write", &pyb_dac_write_obj },
-    { "dma", &pyb_dac_dma_obj },
+    { MP_QSTR_noise, &pyb_dac_noise_obj },
+    { MP_QSTR_triangle, &pyb_dac_triangle_obj },
+    { MP_QSTR_write, &pyb_dac_write_obj },
+    { MP_QSTR_dma, &pyb_dac_dma_obj },
     // TODO add function that does double buffering:
     //  dma2(freq, buf1, buf2, callback)
     //  where callback is called when the buffer has been drained
-    { NULL, NULL },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_dac_type = {
diff --git a/stmhal/exti.c b/stmhal/exti.c
index 8aaa99d42990970e7a1160d605523fa91b0cce07..41f8e378a8ae2f7adf522eb6bd056413e41955b0 100644
--- a/stmhal/exti.c
+++ b/stmhal/exti.c
@@ -229,11 +229,11 @@ static MP_DEFINE_CONST_FUN_OBJ_1(exti_obj_disable_obj, exti_obj_disable);
 static MP_DEFINE_CONST_FUN_OBJ_1(exti_obj_swint_obj,   exti_obj_swint);
 
 static const mp_method_t exti_methods[] = {
-    { "line",  &exti_obj_line_obj },
-    { "enable",  &exti_obj_enable_obj },
-    { "disable",  &exti_obj_disable_obj },
-    { "swint",  &exti_obj_swint_obj },
-    { NULL, NULL },
+    { MP_QSTR_line,  &exti_obj_line_obj },
+    { MP_QSTR_enable,  &exti_obj_enable_obj },
+    { MP_QSTR_disable,  &exti_obj_disable_obj },
+    { MP_QSTR_swint,  &exti_obj_swint_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static mp_obj_t exti_regs(void) {
diff --git a/stmhal/file.c b/stmhal/file.c
index 83bb6013fc984115dfab6a78a834583d6d6ff5e5..210d26803d45abdaa7b3633efd8ebfd7f1f45607 100644
--- a/stmhal/file.c
+++ b/stmhal/file.c
@@ -52,10 +52,10 @@ static MP_DEFINE_CONST_FUN_OBJ_1(file_obj_close_obj, file_obj_close);
 // TODO gc hook to close the file if not already closed
 
 static const mp_method_t file_methods[] = {
-    { "read", &file_obj_read_obj },
-    { "write", &file_obj_write_obj },
-    { "close", &file_obj_close_obj },
-    {NULL, NULL},
+    { MP_QSTR_read, &file_obj_read_obj },
+    { MP_QSTR_write, &file_obj_write_obj },
+    { MP_QSTR_close, &file_obj_close_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t file_obj_type = {
diff --git a/stmhal/help.c b/stmhal/help.c
index 9efe374524613514cf562aafab10c93ff556af9a..a1c81c824fbbd6ebca4692f0cc2459ad57c4624b 100644
--- a/stmhal/help.c
+++ b/stmhal/help.c
@@ -38,14 +38,10 @@ STATIC const char *help_text =
 "  CTRL-D       -- on a blank line, do a soft reset of the board\n"
 ;
 
-STATIC void pyb_help_print_info_about_object(mp_obj_t name_o, const char *name_str, mp_obj_t value) {
-    if (name_o != MP_OBJ_NULL) {
-        printf("  ");
-        mp_obj_print(name_o, PRINT_STR);
-        printf(" -- ");
-    } else {
-        printf("  %s -- ", name_str);
-    }
+STATIC void pyb_help_print_info_about_object(mp_obj_t name_o, mp_obj_t value) {
+    printf("  ");
+    mp_obj_print(name_o, PRINT_STR);
+    printf(" -- ");
     mp_obj_print(value, PRINT_STR);
     printf("\n");
 }
@@ -72,14 +68,14 @@ STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) {
         if (map != NULL) {
             for (uint i = 0; i < map->alloc; i++) {
                 if (map->table[i].key != MP_OBJ_NULL) {
-                    pyb_help_print_info_about_object(map->table[i].key, NULL, map->table[i].value);
+                    pyb_help_print_info_about_object(map->table[i].key, map->table[i].value);
                 }
             }
         }
 
         if (type->methods != NULL) {
-            for (const mp_method_t *meth = type->methods; meth->name != NULL; meth++) {
-                pyb_help_print_info_about_object(MP_OBJ_NULL, meth->name, (mp_obj_t)meth->fun);
+            for (const mp_method_t *meth = type->methods; meth->name != MP_QSTR_NULL; meth++) {
+                pyb_help_print_info_about_object(MP_OBJ_NEW_QSTR(meth->name), (mp_obj_t)meth->fun);
             }
         }
     }
diff --git a/stmhal/i2c.c b/stmhal/i2c.c
index b8608ad3ba3f08d1aa027909c6c895fa341bce12..91cb17b33ed59bfe71c398f4a693e691dec6609f 100644
--- a/stmhal/i2c.c
+++ b/stmhal/i2c.c
@@ -170,10 +170,10 @@ STATIC mp_obj_t pyb_i2c_mem_write(uint n_args, const mp_obj_t *args) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_i2c_mem_write_obj, 4, 4, pyb_i2c_mem_write);
 
 STATIC const mp_method_t pyb_i2c_methods[] = {
-    { "is_ready", &pyb_i2c_is_ready_obj },
-    { "mem_read", &pyb_i2c_mem_read_obj },
-    { "mem_write", &pyb_i2c_mem_write_obj },
-    { NULL, NULL },
+    { MP_QSTR_is_ready, &pyb_i2c_is_ready_obj },
+    { MP_QSTR_mem_read, &pyb_i2c_mem_read_obj },
+    { MP_QSTR_mem_write, &pyb_i2c_mem_write_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_i2c_type = {
diff --git a/stmhal/led.c b/stmhal/led.c
index 688daefc818b81b29cec76af672fdb5010f28995..989ce3897f38d4ce22ee89c06f596873c37e7dcc 100644
--- a/stmhal/led.c
+++ b/stmhal/led.c
@@ -257,11 +257,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(led_obj_toggle_obj, led_obj_toggle);
 STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(led_obj_intensity_obj, 1, 2, led_obj_intensity);
 
 STATIC const mp_method_t led_methods[] = {
-    { "on", &led_obj_on_obj },
-    { "off", &led_obj_off_obj },
-    { "toggle", &led_obj_toggle_obj },
-    { "intensity", &led_obj_intensity_obj },
-    { NULL, NULL },
+    { MP_QSTR_on, &led_obj_on_obj },
+    { MP_QSTR_off, &led_obj_off_obj },
+    { MP_QSTR_toggle, &led_obj_toggle_obj },
+    { MP_QSTR_intensity, &led_obj_intensity_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_led_type = {
diff --git a/stmhal/qstrdefsport.h b/stmhal/qstrdefsport.h
index 4036dcd25e28c1b9a92b5b143cd3b860b538e035..c8e6783338797f0859e835bde9cbb3c3c12f8b8e 100644
--- a/stmhal/qstrdefsport.h
+++ b/stmhal/qstrdefsport.h
@@ -4,6 +4,8 @@ Q(help)
 Q(pyb)
 Q(info)
 Q(sd_test)
+Q(present)
+Q(power)
 Q(stop)
 Q(standby)
 Q(source_dir)
@@ -17,23 +19,17 @@ Q(switch)
 Q(SW)
 Q(servo)
 Q(pwm)
-Q(Accel)
+Q(read)
+Q(write)
 Q(hid)
 Q(time)
 Q(rng)
-Q(Led)
 Q(LCD)
-Q(Servo)
 Q(SD)
 Q(SDcard)
-Q(I2C)
 Q(gpio)
 Q(gpio_in)
 Q(gpio_out)
-Q(Usart)
-Q(ADC)
-Q(ADC_all)
-Q(DAC)
 Q(open)
 Q(File)
 // Entries for sys.path
@@ -44,7 +40,6 @@ Q(Pin)
 Q(PinMap)
 Q(PinAF)
 Q(PinNamed)
-Q(Exti)
 Q(ExtiMeta)
 Q(rtc_info)
 Q(millis)
@@ -54,6 +49,59 @@ Q(PULL_DOWN)
 Q(PUSH_PULL)
 Q(OPEN_DRAIN)
 
+// for Led object
+Q(Led)
+Q(on)
+Q(off)
+Q(toggle)
+Q(intensity)
+
+// for Usart object
+Q(Usart)
+Q(status)
+Q(recv_chr)
+Q(send_chr)
+Q(send)
+
+// for exti object
+Q(Exti)
+Q(line)
+Q(enable)
+Q(disable)
+Q(swint)
+
+// for I2C object
+Q(I2C)
+Q(is_ready)
+Q(mem_read)
+Q(mem_write)
+
+// for Accel object
+Q(Accel)
+Q(x)
+Q(y)
+Q(z)
+Q(tilt)
+Q(filtered_xyz)
+
+// for ADC object
+Q(ADC)
+Q(ADC_all)
+Q(read_channel)
+Q(read_core_temp)
+Q(read_core_vbat)
+Q(read_core_vref)
+
+// for DAC object
+Q(DAC)
+Q(noise)
+Q(triangle)
+Q(dma)
+
+// for Servo object
+Q(Servo)
+Q(angle)
+
 // for os module
 Q(os)
 Q(/)
diff --git a/stmhal/sdcard.c b/stmhal/sdcard.c
index 20a481849c67770675687b25be199891bbbeb5d9..5392b02731e462ca90a9358c9c0d4ad5674ea13a 100644
--- a/stmhal/sdcard.c
+++ b/stmhal/sdcard.c
@@ -233,10 +233,10 @@ static mp_obj_t sd_read(mp_obj_t self, mp_obj_t block_num) {
 static MP_DEFINE_CONST_FUN_OBJ_2(sd_read_obj, sd_read);
 
 static const mp_method_t sdcard_methods[] = {
-    { "present", &sd_present_obj },
-    { "power", &sd_power_obj },
-    { "read", &sd_read_obj },
-    { NULL, NULL },
+    { MP_QSTR_present, &sd_present_obj },
+    { MP_QSTR_power, &sd_power_obj },
+    { MP_QSTR_read, &sd_read_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t sdcard_type = {
diff --git a/stmhal/servo.c b/stmhal/servo.c
index 81b290bf5261cd032fe2d8eaeb6f5c1049d7901f..17722dc6cdfd5902aa304bbb31e95c4549c160d8 100644
--- a/stmhal/servo.c
+++ b/stmhal/servo.c
@@ -206,8 +206,8 @@ STATIC mp_obj_t pyb_servo_angle(uint n_args, const mp_obj_t *args) {
 STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pyb_servo_angle_obj, 1, 3, pyb_servo_angle);
 
 STATIC const mp_method_t pyb_servo_methods[] = {
-    { "angle", &pyb_servo_angle_obj },
-    { NULL, NULL },
+    { MP_QSTR_angle, &pyb_servo_angle_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_servo_type = {
diff --git a/stmhal/usart.c b/stmhal/usart.c
index 31308c22ad8dca639a956c53507ebc72598b9f50..d3a54f9d845446e995cc7e217f4d73194890a328 100644
--- a/stmhal/usart.c
+++ b/stmhal/usart.c
@@ -210,11 +210,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_char_obj, usart_obj_tx_char);
 STATIC MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_str_obj, usart_obj_tx_str);
 
 STATIC const mp_method_t usart_methods[] = {
-    { "status", &usart_obj_status_obj },
-    { "recv_chr", &usart_obj_rx_char_obj },
-    { "send_chr", &usart_obj_tx_char_obj },
-    { "send", &usart_obj_tx_str_obj },
-    { NULL, NULL },
+    { MP_QSTR_status, &usart_obj_status_obj },
+    { MP_QSTR_recv_chr, &usart_obj_rx_char_obj },
+    { MP_QSTR_send_chr, &usart_obj_tx_char_obj },
+    { MP_QSTR_send, &usart_obj_tx_str_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 const mp_obj_type_t pyb_usart_type = {
diff --git a/unix/file.c b/unix/file.c
index 258aa65d50bfea1ffd96d66f4cf0336211429d22..d711ace4f18faccc0097b9027b040f37cf1c4024 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -106,13 +106,13 @@ static mp_obj_t fdfile_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const
 }
 
 static const mp_method_t rawfile_type_methods[] = {
-        { "fileno", &fdfile_fileno_obj },
-        { "read", &mp_stream_read_obj },
-        { "readall", &mp_stream_readall_obj },
-        { "readline", &mp_stream_unbuffered_readline_obj},
-        { "write", &mp_stream_write_obj },
-        { "close", &fdfile_close_obj },
-        { NULL, NULL },
+    { MP_QSTR_fileno, &fdfile_fileno_obj },
+    { MP_QSTR_read, &mp_stream_read_obj },
+    { MP_QSTR_readall, &mp_stream_readall_obj },
+    { MP_QSTR_readline, &mp_stream_unbuffered_readline_obj},
+    { MP_QSTR_write, &mp_stream_write_obj },
+    { MP_QSTR_close, &fdfile_close_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t rawfile_type = {
diff --git a/unix/main.c b/unix/main.c
index eecec301bf516fe4908558b2aa4b26482bb864b4..e8452fd8cc86ea8c3d6b1732ddd60b8cb8b01f9a 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -192,9 +192,9 @@ static MP_DEFINE_CONST_FUN_OBJ_1(test_get_obj, test_get);
 static MP_DEFINE_CONST_FUN_OBJ_2(test_set_obj, test_set);
 
 static const mp_method_t test_methods[] = {
-    { "get", &test_get_obj },
-    { "set", &test_set_obj },
-    { NULL, NULL },
+    { MP_QSTR_get, &test_get_obj },
+    { MP_QSTR_set, &test_set_obj },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t test_type = {
diff --git a/unix/qstrdefsport.h b/unix/qstrdefsport.h
index 867afaeac06f68286d1340c27398ac1cb52e5b59..783e9cc01116e632d6e890072992fa31b09818c1 100644
--- a/unix/qstrdefsport.h
+++ b/unix/qstrdefsport.h
@@ -15,6 +15,18 @@ Q(inet_aton)
 Q(gethostbyname)
 Q(getaddrinfo)
 Q(microsocket)
+Q(fileno)
+Q(read)
+Q(readall)
+Q(readline)
+Q(write)
+Q(makefile)
+Q(connect)
+Q(bind)
+Q(listen)
+Q(accept)
+Q(recv)
+Q(setsockopt)
 
 Q(io.FileIO)
 Q(ffimod)
diff --git a/unix/socket.c b/unix/socket.c
index d7202751924fb46591607c235a4f4485dbd0136f..85e59b2848de09e54f8707d83281a7d47c27ce7b 100644
--- a/unix/socket.c
+++ b/unix/socket.c
@@ -218,25 +218,25 @@ static mp_obj_t socket_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const
 }
 
 static const mp_method_t microsocket_type_methods[] = {
-        { "fileno", &socket_fileno_obj },
-        { "makefile", &mp_identity_obj },
-        { "read", &mp_stream_read_obj },
-        { "readall", &mp_stream_readall_obj },
-        { "readline", &mp_stream_unbuffered_readline_obj},
-        { "write", &mp_stream_write_obj },
-        { "connect", &socket_connect_obj },
-        { "bind", &socket_bind_obj },
-        { "listen", &socket_listen_obj },
-        { "accept", &socket_accept_obj },
-        { "recv", &socket_recv_obj },
-        { "send", &socket_send_obj },
-        { "setsockopt", &socket_setsockopt_obj },
-        { "close", &socket_close_obj },
+    { MP_QSTR_fileno, &socket_fileno_obj },
+    { MP_QSTR_makefile, &mp_identity_obj },
+    { MP_QSTR_read, &mp_stream_read_obj },
+    { MP_QSTR_readall, &mp_stream_readall_obj },
+    { MP_QSTR_readline, &mp_stream_unbuffered_readline_obj},
+    { MP_QSTR_write, &mp_stream_write_obj },
+    { MP_QSTR_connect, &socket_connect_obj },
+    { MP_QSTR_bind, &socket_bind_obj },
+    { MP_QSTR_listen, &socket_listen_obj },
+    { MP_QSTR_accept, &socket_accept_obj },
+    { MP_QSTR_recv, &socket_recv_obj },
+    { MP_QSTR_send, &socket_send_obj },
+    { MP_QSTR_setsockopt, &socket_setsockopt_obj },
+    { MP_QSTR_close, &socket_close_obj },
 #if MICROPY_SOCKET_EXTRA
-        { "recv", &mp_stream_read_obj },
-        { "send", &mp_stream_write_obj },
+    { MP_QSTR_recv, &mp_stream_read_obj },
+    { MP_QSTR_send, &mp_stream_write_obj },
 #endif
-        { NULL, NULL },
+    { MP_QSTR_NULL, NULL },
 };
 
 static const mp_obj_type_t microsocket_type = {
diff --git a/windows/qstrdefsport.h b/windows/qstrdefsport.h
index a8b4313d8053eb4d2f66f936bf8489c29e6e4e28..783e9cc01116e632d6e890072992fa31b09818c1 100644
--- a/windows/qstrdefsport.h
+++ b/windows/qstrdefsport.h
@@ -1,9 +1,35 @@
 // qstrs specific to this port
 
+Q(Test)
+
 Q(argv)
 Q(open)
 Q(stdin)
 Q(stdout)
 Q(stderr)
+Q(rawsocket)
+Q(socket)
+Q(sockaddr_in)
+Q(htons)
+Q(inet_aton)
+Q(gethostbyname)
+Q(getaddrinfo)
+Q(microsocket)
+Q(fileno)
+Q(read)
+Q(readall)
+Q(readline)
+Q(write)
+Q(makefile)
+Q(connect)
+Q(bind)
+Q(listen)
+Q(accept)
+Q(recv)
+Q(setsockopt)
 
 Q(io.FileIO)
+Q(ffimod)
+Q(ffifunc)
+Q(fficallback)
+Q(ffivar)