Refactored configuration to add flexibility