Added karma as a test-runner.
Updated the code to function within the scope of karma.
Added a single test to get everything functional.