Move tasks into separate folder and fix JSCS/JSHint

- Migrate Grunt tasks into separate files for better maintainability.
- Fix JSCS and JSHint errors.