Finished cleaning of mScan.pas

Started cleaning mScanAll.pas, going to continue later.