Minor improvements and cleanup of tagParser.js.