Add basic environment support

Good point. I'll dig into that and get back to you.