code cleanup, add tests for html tag