Work in progress.
Refactor.
Add user control for log view.