fix bugs in IE8 and move to Karma test runner
clean up