updated the main
refactoring changes
added grunt watch dependencies
added more tests and split the tests into seperate files