Added unit tests
Merge branch 'malformedtags'