Split out some of the event management code and moved more things from main.js to adventure.js
Renamed event manager to ui manager
Refactored the code more. I forgot to commit some files in some of the previous commits.