Rough, ready, but working.

Much more cleaning up to come...