Bugfixes for auto-deleting images, misc function additions.