Split apart code into requirejs modules