Refactoring.
Mainly log cleanup.
Mainly log cleanup.