added a FunctorModelLibrary class; minor API changes/clean-up