Moved all of the player logic into an AppState.