Quieted several compiler warnings by adding some protocol declarations and declaring a couple of methods in odd places. Tested on 10.7 Xcode 4.6, I'll try to test on 10.8 at some point.