Functional prototype complete, committing before an OO refactor.