removed Area and changed MainLoop

MainLoop now calls a DoState(Integer) procedure that will do the action
desired