Moved config merging to it's own class