Added pausing, expanded the state system