unit tests, karma, pre commit hook, fix bugs