Changed ScanSAM to an object, added a different class for main method