Added undirected graph support and improved docs