Fix imports (2).
Simplify and extend Bayes net methods.