set up grunt build and tidied up code formatting