Clean up the if statements bunch