Refactored ICSFormat axis population

Instead of building arrays to populate the axes, they are now added
incrementally to make the logic clearer.