Added better env support.