Refactor attribute processing in list generation