Initial move to require.js. I'd like each file to be modularized but there's a lot of refactoring involved.