Fixes #23 + #25 - Styles + Refactor + Tests

Sorry - not the easiest PR to read.  Main gist, clean up main output.js, resolving jshint issues.  Second, extra all most string utils into utils module and add tests for these.