Beautified some if/else clauses.