view-query and pagination merged with mnunberg's master