Add some comment and remove some waste code.