Fix bugs, benchmark tool