Adding template inheritance