Clean up docstrings, refactor some common logic
split up long line
test doctests as well
Merge pull request #4 from catlee/master

Clean up docstrings, refactor some common logic