First cut at Karma testing. Still not there but this commit includes a
lot of progress.