Initial commit. Needs some cleanups, a design and docs.