Extended to support environment variables in config