Resetting all nodes before validating solution

Indentation adjusted to tabs.