Seperated Node and Edge to own files, added topological sorting.