Refactoring for new requirements