Fix failure when 'slices' is not set
Modest speedups
Additional caching
Bugfix
Fix test failure