Remove dead code, and fix foo's exploit