Several bug fixes needed to get the tests to run
Fixed processing of priors in topology algorithms