cleaned up the calc_centrality_opt function to be more readable and to interface with new degree centrality cython interface; cleaned up cython centrality interface