Changed the code to make use of Typed Arrays and DataView