Extract some duplicated query building logic and add support for multi-level link queries
Enable unused parameter warning in the Xcode 6 project
Eliminate more of the differences between link and regular queries