Added error checking for singular tags and a basic unit test.