Some refactoring done. Changed mode to control_mode and view_mode for different mode types.
avoidance is its own class that is used by the robot directly
Added the basis of autonomous control