A bit of a massive re-write and shippable, after review of course.