Refactoring image quality variable with dependencies