Reduced code size and a bit of a tidy.