Split into client and server libraries