A wee refactor