more environment detail and cleanup