A bit more work on the scanner