Refactor for some DRY