Refactor configuration file and add Debug flag

This requires manual configuration changes.