Using environment for typedef replacment
Fixing up more types