Added gamestates and fixed some stuff