mega changes to the whole app structure and logic