DRYing line()

Removing duplication of logic. Switching line() from directly outputting to the PDF to calling lines().