Added more documentation, fixed error handling in response serializer