Refactor version cleanup code into a separate function, extend it a bit.
Very rough attempt at evaluating the usefullness of checking packages against security advisories(GLSA
in this case)