Refactoring: read-only mode, unnecessary code

Refactoring: read-only mode, unnecessary code #501