Refactored configuration to private methods