Small design and refactoring