delete unused code; reformat comments