Scope rewrite

This fixes #525 and cleans up a lot of Mustache.  This includes a lot of nice inline comments too.