Clean up debug trace and add dump tool