Refactorized. Added colours to log pane.