Changed interface of cut vertices and bridges algorithms form classes to functions