Update: class ImgDatabase almost done. Not tested