Split up rendering a bit more.

Make various methods protected so it's possible to extend the
renderer.
Merge pull request #14 from csmith/master

Split up rendering a bit more.