Template generator/extractor in progress