Cleaned up some if statements.