added indexes, and fixed dependent destroy on some models