remove warnings, remove dead code