Fix for synchronizing on the wrong object from my last push.

Renamed a few inner-classes for clarity