Remove some unused code and comments