Refactor canvas methods in a diferent js file. Added jshintrc file