Maintenance/refactor vignette

This is a port of Charlie's changes to the vignette to current master. I'd love to include it into the upcoming CRAN release.

I'll read it today to check for errors. @yihui: Please feel free to join :-)

Related to #7.