Initial implementation of DAGs. Edit is not working.