refactoring all the distro-decision scripts!