Some doc fixes; (untested) attempt to tidy up Hungarian algorithm