restructured template layout