cleaned structure and added env to lookup