Scan input

Pull the scan input changes into the master.