Used CommonJS wrapper for Require.js, to clean up very long function-calls in the define-module.
Cleaned up main.js