Shuffled a few pieces of code around so I could group them nicely and understand what in god's name I've built. Added some header notation and console.logging of the various game components, so that maybe other people can also look at my code and be able to tell what's going on.