Code refactering, added sessionDetails, other updates