Cleaned up if-conditionals