Fixed errors in wrapper generation related to TabulatedFunctions
Renamed methods for dealing with TabulatedFunctions to avoid problems in wrapper APIs.  Also fixed a few bugs.