Split client into client and upstream