remove some unused code
Merge pull request #1556 from ruil2/max2

remove some unused code