Bits of refactoring