fixing getAttachmentPreview code; tweaking logging levels; tweaking styles;