completion: add test for unknown tokens
completion: bugfix
completion: refactoring and bugfix
completion: skip whitespaces