Fix bug in TbHtml::checkBoxList, refactor methods for creating media objects and add more tests