Refactor grapher and clusterer into individual files.