Improved gamestates, code clean up