Refactor. Added downloading for previews in background.