Refactored to allow interpreter to send events. Added a bunch of new
external methods for controlling robot.