Remove unused variable
Merge if statements