Refactor vector section parsing

Further duplicate code removal.