Tidied up config variables and generation of images.