added triggers for determining when the is_active flags are changed on entities. Two basic tests pass