A bit of a massive refactoring. Mostly consisting of moving code around, and cleaning up jshint errors. Added jshint task to grunt. Added plugin definition so that plugin is called against an element in the traditional way