Add pagination, refactor collaboration code