Fixed example config
Refactored everything a bit