Changed ifs with returns to if/else