Moved config loading to a new class.