basic refactor of dom #SGoo-17 comment