Merge pull request #24 from joneshf/master

Some bug fixes
Started cleaning up.