Lots of changes to get near a working prototype