Update snippet trimming, bug fixes

Want to avoid things like ‘this.this.moveRight()();’
Few minor bug fixes.
Fixes #1