Remove reference to dmLink.
Code formatting.
Complete rewrite of random fact rule.