Fixed formatting and bad practice

I found a lot of if/else instead of a switch statement and I fixed the whole double and single quote issue, and I also improved readability and made the format of it fit with the original formatting.