Added InstallPackages, polished code