some cleaning + thumbnail generator