Added templates support;