Updated scanner with new getToken() method.