improve tag module and tests therefore