fixed example configuration
restructured the code a bit
Merge pull request #9 from nilsding/master

restructured code