BoxFilePreview code improvements