Completed visualize functionality. Fixed minor bug in graph