runningEnvironment() added, fixed stupid console mistakes

Function to handle changing running environment entirely with one
command.
Fixed several commands mistakenly broken (whoops).