added more tests, simplified existing tests, added more docs.
Merge pull request #25 from curlee/master

added more tests, simplified existing tests, added more docs.