refactored, added dependent destroy, fixed link