add block-swapping ability to template system.