Moved the citation graph plotting code into its own function and began
implementation of the ER algorithm.