Remove unused variables and deprecated data updates