Refactoring thumbnail align