Wip

Head of this has some fixes on that may be of interest.