General cleanup. Remove Context::getEnvironment (duplicated function)
Transform hardcoded PHP to nodes.
Also extract getEnvironment calls to $environment variable.