Draft implementation of type blocking and dimension folding.