clean ups & better handling of images