Big cleanup. All apt stuff in one place; fewer apt-get commands, and only one reboot during install process.