Used AtomicInteger rather than synchronized methods.
Made fields final.

Got a warning about synchronizing on a non-final field. These fields
should not change during the life of the object.
white space