Changed thumbnail functionality - fixed various bugs related to spacing