Minor refactorings
Replace tabs with spaces
Extract messaging to own class