added image thumbnails and fixed some bugs