create unit tests and refactor TagCollection to namespace