Switched to regexp test since startsWith is only available in newer js
versions.
Refactoring to use requirejs for modularization using grunt-requirejs.
Removed unused grunt tasks.