remove dead code and methods