FIX: workaround appId generation regression (due to b2g-desktop forced exit) and code cleanup