An improved algorithm for the computation of structural invariants of a system pencil and related geometric aspects