added possible ideas for improving the code
extracted config handling in a modul