Added get word from caret
Fixed slow code for resolving unknown types