ajax_control, a javascript file that will communicate with our ajax controller.
Added a function to handle our state machine
small naming change on controller