Research code for OnionMap