Adding template inheritance and environmental config