remove unused and extra code.

remove unused and extra code.