Upgrade most of the main-templates on erb layouts.