Start dom namespace.
Fix spelling error which caused error on second round, and move call to append panel to outside the build function.