Make installation script ready for 5.1.0 and pup removal

Do not merge before 5.1.0 release.