Attempt to develop generic response handling