Enhanced to remove environment variables.