Fixed compiler errors in some cleaned-up modules, cleanup of more modules.