Simplified the parseTag function

A switch statement would be far more appropriate here.
Yeh, that's what I was referring to when I said "I just formatted this oddly".