fix, cleanup, remove dead code