Add countNodes()
Remove TO DOs and swap functions