Renamed scanner class and fixed threading