Now creating thumbnails for jpeg and png files
Code cleaning, comments and todo added