Moved around and added some comments in env_test.go/cmd_test.go, refactored some tests