added remove and update query. fixes and updates.