Add some intermediate fixes to teh previous checkin.
This is still broken and will collide with other work but I'll fetch merge.