Mods for full model run, added Luke's caching to some other functions.