Internal message processing reworked.
Added log rotation.