MAJOR refactor to make scanmon a pseudo package.

This will allow separate functions to be put in separate modules and facilitate plugins and the like.