fixed up broken unit tests (code, tests still fail)
Merge pull request #50 from phillip-haydon/cleanup

Unit Test fixes and cleanup.