Graph can now be cleared by user. Code needs refactoring.