More refactoring, removing repetitive instances in conditionals