Clean up index handler to remove dead code.