Reposition template generation functions