Foundation for client rewrite