Further work on qual_image, testing out what information would be useful to gather, fixed infinate loop bug