More changes for #48 expression caching