Change ctx() and req() to opaque