Continued implementation of Karma + Jasmine tests

WIP: Continued to implement Jasmine tests.
Improved detection of null and undefined variables when printing.