Add API and ajust app structure