Fixed typo: comlete -> complete
Added tests with autocompletion edge cases