Moved RequiredDOM to own file and cleaned it up.