Simplified the parseTag function

A switch statement would be far more appropriate here.
Actually, no, there's a missing `)` in the `switch`. I just formatted this oddly. One sec...