Cleaning up code for bench demonstration.