Fix some issues with statics and internals.
Clean up log events.