Extracted arraybuffer slicing to a separate module