Commented code. Changed all DAM references to DAG.