Rewrite server to support uniqueids