Added pagination + reference resolution