Refactor respond_to calls