Rewritten listener: more modular and now with a background daemon version and a CLI version.
Comments improved.
Logging improved.