Better separate redrawing and updating code.