Fix code review issues:
 - Make handleJumpToDefinition return a proper promise.
 - Minor cleanups.