Minor fixes to h5 and dom, added tests for those