Implement recursive indirect block creation for DAGs

Also cleaned up a bunch of code related to building and reading DAGs
english is not my first language. C is.