Update eigenvector centrality code

Also streamlined code in general.

Signed-off-by: Zarrar Shehzad <czarrar@gmail.com>