Some cleanup and removed ScanResultType as it is no longer needed