Just some speed optimizations

Can save one line by doing `for ($x = 0, $sizeOf = sizeof($original); $x < $sizeOf; $x++) {` and `$sizeOf` will still be cached :smiley: