More thorough unit testing and CS Fixes
Merge pull request #10 from kmfk/unit-tests

More thorough unit testing and CS Fixes