Update to use new scanner API
Start adding tests