Moved all event code to the correct game states