Formatted else-if chain for readability[condensed]