Implemented a basic graph with directed/undirected