Completed  restructuring for states

Game works again and now with states!