image size optimization. General cleaning