Initialize logging.
Add logging throughout module.
Merge branch 'logging'

Fixes #18.