Move into Require.js

Migrate all javascripts into require.js