Towards being compilable on many platforms.

Resolved: Logging improvements #6