Optimise some images and remove bad code