Refactoring DRY shit