Module fixes - A bunch of needed enhancements to the module system