Reduce variable scope.
Comment out unused functions.