Added proper configuration management, with merging and prioritization