Add a sample of the configuration file
Refactor a bit to make it easier to process by humans
Bugfixes and improvements