Refactored config and request