Add Environment to compiler function