Implement procEnv feature. Refactor local option logic.