Fixed dom creation and extended tests.