Refactored JavaScript code
Removed config file
Merge pull request #1432 from benjamij/moodle-js-refactoring

Moodle js refactoring