Add support for requirejs and CommonJs module styles. Updated jasmine tests.