Move remaining button code from main loop to manager task.