Lots of refactoring and setup for the slice'n'dice.