Implement APIResponse in a better way.