5598dc1 style schedule, slight reorganization of template code