First attempt at converting to knitr