Implement recursive indirect block creation for DAGs

Also cleaned up a bunch of code related to building and reading DAGs