Improve completion routines. Add URIParser. Various fixes.