Made a few aesthetic refactors

Most of this commit consists of breaking things out on to more readable lines,
improving console.log messages, and clarifying var names.
Refactored to make deps easier to read

Uses RequireJS's AMD sugar syntax
http://requirejs.org/docs/whyamd.html#sugar