Use defaultdict for easier init when adding nodes