Synchronized a few appropriate places.

While the android platform prohibits many threading issues,
went through and place a few precautions on methods most
likely to cause problems.