Remove unnecessary else and elseif with return.