Refactoring of thumnail generator + new parallel version