Fix a critical bug and some more changes

1. In simulation, determine first time or not by fecGroups.size() == 0
is wrong. If the first run generates no fec groups, the following round
should not do the initialization again.
2. Use list instead of vector when processing fec groups
3. Use some typedef to make codes shorter