State managing and stuff

This is so we don't need to mess with the main loop every time we want to add something, and to remove ambiguity (like, if the user exits the inventory screen, do we go to the overworld, the battle screen, what?).