flattened client/lib a bit