Preliminary commit, lots of things working but not quite there