Add package.json, grunt tasks and refactor the tests