Use logging by default in development, or if enabled via logging
setting. Fixes #6.

- some minor code cleanup.