Get new template matching working