Removed a bunch of else if statements with switch case
Did something I have no idea what I did though