Refine Ch.20 challenge 2. Remove useless variables.