Fixed a couple of compile errors for Xcode6.  Found a thread problem in the offline layer (was crashing).