added requirejs functionality.