Differentiate public and private functions
fix destroy function
change setupThumbnail to allow right resize function