Implemented sorting and deletion of objects