Add basic environment support

Was this used anywhere? If the default value is now nil, any concerns?