Autodiscovery

Fix #11 

Feedback appreciated.