Refactored response class to reduce duplication