Initial commit + tests. Restructuring pending.