chore(src/*): rewrite of all the source code
chore(karma): update tested file list
chore(grunt): update list of files and fix karma+watching
test(*): add tests for the new rewrite