Fix #3: Handle testing and production environment cases for templating