Optimize structure of app