Full compliance with AMD.

Previously didn't have full module definition - now it's completely in
place, allowing for a single file to be downloaded on initial page load.
This should make the app a good deal more mobile-friendly.