refactored some environments to pex-core
removed debug code