Implemented some update and delete functions for the database