formatting fixes + remove dead code