Cleaned up date formatting further and converted from readAsBinaryString to readasarraybuffer