updating to use URL.createObjectURL as much as possible