some simplifications + moving datalog to be a django app