better management of app_id and a few fixes in the setup generator