First real commit. Adds prototype code.

TODOs: write spec, refactor, cleanup, docs: the works...