NXP-12359: add copyright header + cleanup thanks to Sonar
NXP-11560: add a flag in session to indicate the previous one had timed out
NXP-11560: cosmit