Some reordering in template and data