redesign template storage