added tests, changes to htmltable