by rlmumford: Added Rules and Flexiform integration.