Refactoring to allow for new requirements