Break up Block.ts

Also migrate DomUtils.ce to use a map for attributes.