remove dead code, -Wall Repl and other tiny fixes