factor out text routines to text module
local tab completion moved to Complete module
refactor remote tab-completion to Complete module