Added command logging for DAG changing commands. Also attempted to make
the DAG more efficient (only slightly so).