Optimize list handling