Remove some unnecessary variables in the List class