Added testcase for TagParser.
Fixed unit test and fixed TagParser based on information gained.