Deleted unused function and added thumbnail support.