Removal of unused variables