Implemented re-resolve on error for topology and added tests.
removed superfluous line from test.
Cleanup for readability and corresponding changes to tests.
Minor cleanup for readability.