rb_define_module_under(BrickPi, "Native"); rb_define_singleton_method(Native, "BrickPiSetup", bprb_BrickPiSetup, 0); rb_define_singleton_method(Native, "BrickPiSetupSensors", bprb_BrickPiSetupSensors, 0); rb_define_singleton_method(Native, "ClearTick", bprb_ClearTick, 0); VALUE MotorSpeed = rb_define_module_under(Native, "MotorSpeed"); rb_define_singleton_method(MotorSpeed, "[]=", bprb_MotorSpeed_set, 2); VALUE MotorEnable = rb_define_module_under(Native, "MotorEnable"); rb_define_singleton_method(MotorEnable, "[]=", bprb_MotorEnable_set, 2); VALUE Address = rb_define_module_under(Native, "Address"); rb_define_singleton_method(Address, "[]=", bprb_Address_set, 2); VALUE SensorType = rb_define_module_under(Native, "SensorType"); rb_define_singleton_method(SensorType, "[]=", bprb_SensorType_set, 2); VALUE Sensor = rb_define_module_under(Native, "Sensor"); rb_define_singleton_method(Sensor, "[]", bprb_Sensor_get, 1); VALUE Encoder = rb_define_module_under(Native, "Encoder"); rb_define_singleton_method(Encoder, "[]", bprb_Encoder_get, 1); Does this look repetitive?