Optimize screen updates (update_rect); simplify menu code