Added improved device identifier code generation