Misc fixes
Add var to toggle logging of events, which is now off by default.
Do the prefix locally.
Compute the prefix locally. Add yasnippet expansion