Clean up if/else logic with helpers.