Added local and remote delete functionality