Clean up code with `mode`.