Bit of refactoring...