Refactored Configuration to remove duplicate code