changed getLastVersionDB because it was only working with single profiles. Should work with multiples now.
starting image gallery
fixed some stuff