Added support for CustomEvent. Switched to requirejs.
Added support for CustomEvent. Switched to requirejs.