Fixed snippets implementation

Also, now the snippet definition is replaced by the snippet value.