recoded all modules to use a scan library

TODO:

add bindings to all the calls. this will reduce memory usage