Small Optimizations

Dictionaries toFunc and fromFunc defined as constants.