Can anyone help me to understand the structure of sentence below?

问题描述:

Can anyone help me to understand the structure of sentence below?
The writing of a dictionary,therefore,is not a task of setting up ruling statements about the “true meanings” of words,but a task of recording,to the best of one's ability,what various words have meant to authors in the distant or immediate past.
I can't understand the structure from "to the best of one's ability" to "what various words have meant to authors in the distant or immediate past." especially TO in the two sentences.What does mean by TO here?For me,TO means one point to another one,right?From Bei Jing to Shang Hai,Two minutes to five o' clock,North to South,But I really can't understand what does To mean here.

"To the best of one's ability" describes how the author of dictionary is going to do the "task of recording".It is an idiom.
"Task of recording" has to be recording something.Here in the sentence,something refers to "what various words have meant".
The meanings of "various words" are not to anyone random,but "to authors" only.