More tweaks to modules system.