Bit of a code tidy-up