Bit of refactoring