delete unnecessary legacy stuff and fix comments