Modify root structure and repository class