Oh dear, lots of this requires fixing.