Initial commit. Needs docs and tests.