Merge of some changes from MC branch.

Adds logging, refactored image view controller, error messages on requests, lots of other stuff.
Fixing analyzer warnings in Xcode 4.6.1
Making unit tests pass again.
Merge commit '2d97fd941bc6f3eac711c9c4256a830fd1fb9f25' into Next
Fixing up indentation.
Merge commit '92299ffcaca41e285fcd091760c3418dfbd823ef' into Next