First crack at some client side unit tests

:warning: It feels like I'm doing this wrong. I'd greatly appreciate some feedback :heartpulse:
Remove extra crap at the end of the file
Fix 'undefined' typo
Merge pull request #65 from svincent/client-test

First crack at some client side unit tests