some progress made on the core bits

Best commit these before I do anything stupid and unrecoverable...