add support for modular file structure

This adds an option to use a modular file structure via options.useModulesStructure"
Not sure if we could have just added the file structure we used as well, but anyway it's more error-prone this way.

PS: I also added karma config to the test watch triggers
I solved the issues I had by adding all Jasmine syntax to jshintrc globals, it prevented build from passing