fixes #1770 - Refactored rdeckfacts definition to use facts_hash

Replaces #752, with tests.