Pushes querying details down into repos; more generic queries; introduces riak repo