progress on DOM code. Still need to fix DOM not inheriting spaces