Fixed files eventManager.js and functions.js according to JSHint.
Modified gruntfile to not check if functions are used before they are defined.
Now less unneccesary errors.