Added graph and edge, vertices logics
some memory leaks here in there mostly fixed. Template is leaking the surface.