Several improvements to the setup module