Added primitive template matching extraction method.