Added templates support.