DRY refactor.