Move plotprep outside browse image function.