Cleaned up debugging statements. Reset environment variable after we're done building.