Refactored code into ModularRobot class.