Minor global cleanup.
Better use of mutex in the struct.
Start of some code to persist images.
Cleanup old images.