Simplify idle_loop()