massive cleanup for net module.