Compressed way of writing edges

I implemented a more compressed way to write the edges in the document. Hope that helps. I didn't replaced the code yet though
Corrected

Little mistake in previous version