Adding a toJSON instance
Adding the delete and update methods