Scanner support

Still needs a fair amount of testing, but it's a start