Fix bug, where expand to word was hanging since begin/end of string was not checked
Fix bug, where begin/end of string was not checked in expand to symbol
Fix look back symbol find
clean code
clean code, use break to escape of loops
clean code