Begin refactoring duplicates logic