Move graph builder to its own block.