add some inline documentation to the modules assignment code
small change to remove excess WS from the debug error log