Case changes and some minor adjustments to tpl.