add Env to hold variables
bugfix: env should not return true for all keys
refactor: emitter should use Env