Refactored code and video thumbnail creation logic implemented