decouple scanners from the main library (removing dependency on I/O functions)