Added functionality to thumbnail generation / remake of functions, tests with pdf to jpg thumbs