Support for snippet based substitutions and completer cleardown code

Added support for snippet based substitutions