Scanner done. Needs tests.