Fixing the two compilation warnings.
Porting to linux Reorganising the code Improving the scan function