Fix bug with multiple partials in a template

This fixes #156.

Also includes some auto-whitespace cleanup from my text editor.