refactor into function objects; warehouse concept not working.
refactor modules into API.
docstrings.
adjust unit tests.