Remove commented-out code (and optimize a function).