Add update and remove unused code