Add unit test

Add unit test for is_tag_prefix new param. Small code tweaks.