Dag implementation and a bit of boolean assign fixes