Using direct prev/next links instead of positions. Added positions sorting before binary search.