Fixes to cache usage, closes #16