Code restructuration in order to control the structure of the app