Program module tweaks

Remake of #966