updating api version to 1.4, convert creation of header date to use .toISOString(). Refactor of generateNonce, and removal of formatCurrentDate(), as it's not needed, and creating the wrong date.