Readonly text box, minor refactorings