edit comments and remove dead code