some refactor app structure