Fixing some bugs
Moving state_control to base