Template reorganization