Handle redraws a little differently. Fixed several bugs.