Add Grunt watch task
[wip] Refactor typescript code a bit