Changed Code Structure

Put Javascript into 3 Phases: PreInit, Init and PostInit. Details on
what each phase is for is in a comment in the code. I have also made the
javascript run after the HTML has loaded (so it has access to DOM
elements) under recommendations from this site:
http://www.feedthebot.com/pagespeed/defer-loading-javascript.html. I
have also made the incremental game save its score to local storage so
that progress is saved. This was also to make sure that local storage
worked.