Finished implementing edit, update, create and delete function