Adding debug output
Big typo fix -_-
Missing variable initialisation
Improve configuration db in one file