Scan API

* API for external plugins (e.g. DonPedro)
* minor fixes