wip on refactor
[wip] More tests and documentation.
More tests and updates
More refactoring; tests passing
Merge pull request #1 from SCPR/refactor

Refactor