Moved distro detection completely to myenv.sh, added more helper func as well. Some other cleanup.