Grunt + fixes + refactor