Refactored file structure, added read_only marker