Changes if statements to match/case statements to maintain consistency with the rest of the code
Renames _1 and _2 to e1 and e2 where necessary
Removes unnecessary conversions to value