Moved robot control logic inside robot class instead of presentation.