Clean up cruft
Tweak Karma config
Add tests for MainCtrl