Added JSON validation, added controllerFunctions.js, more refactoring