Add thumbnail creation

Added thumbnails using graphicsmagick. Ialso ran google closure linter over the js files ;)