It looks like this function reads in a full text file on every call, which I imagine will be slow. It is probably better to cache the data in a variable in either the function or module namespace after it is read in the first time. I can add this functionality, if its not clear how to do it. This will be particularly important when using these functions as models for fitting, where they will be called many times.