Hola Shafayat,
I wanted to let you know, that I have put together a work flow with some screen shots and documentation. This document will cover how to Merge multiple segmented lines which are not connected, into one line. I am then including some suggestions, on your second part, where to remove the extra vertices, and then only have the beginning and ending vertices.
Gracias, Shafayat!