Added template inheritance.