Updated with cascading deletion