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