TemplateLine refactoring

Removed the ```Edge``` class by moving all functionality into the ```TemplateLine``` class.

I also changed ```TemplateLine``` such that ```getNEdges()``` will now return 1 and you can also get the edge nodes. This was inconsistent before.