Added a rebuild-graph operation that fixes errors in the graph database.

Also fixes a couple incorrect javadoc comments.