Added requirejs handling
requirejs refactor