Adds deleting for images, heaps of bugfixes.