Finished requirejs refactoring