Bit of a rewrite