Move some helpers out.
Move the filesystem watcher and scanner to another package and create an
interface.