Redirecting warnings to stderr

This required a new "logger" class to avoid circular dependencies.
I also edited inconsistencies in logged messages (mostly newlines)