Refactored, DRY.