Implemented activeCheck and sandwich for DAT

I also changed sandwich to use a hash, then return the reference. I
think it's a little bit clearer that way, although not too much
different.