A bit of a refactoring