Optimize the two threads and how drawing is handled.