Updated to associate pages to collections and merged from upstream