Refactoring of viewStructure