New features

Two commits with detailed messages. Basically this pull request is to refactor how the changes are implemented, and to add an "ensure" parameter to allow users to ensure the console_env behavior present or absent.