Rewrite webbench in C++