move clientFields func defn to core

This is so that it is not recreated every time a model is created.