moved delete functionality from router to views