Very hard refactoring (All arrays to lists)