Added write protect to root. Improved printouts.
Minor refactoring.