changed handling of images so that all images are stored in the mainwindow class - less memory wasting. Also changed map[][] from c-style to STL vector.