Make print statements into functions

Resolves #3.