Added more tests.
Fixed some JavaDoc spelling errors.
Changed fields to be volatile.
Fixed issue where synchronization was occuring on variable that was being
reassigned.