Fix hlint errors.

Issue #41.
Use printf() instead of puts() to print strings.

Closes #89.
Formatting change.