Various fixes to initial project commit. Still very much proof-of-concept.