More DRY-ing of too long functions