improved structure of app