Implemented RWCFG

Finished recursive implementation of RWCFG; computationally correct,
may need conceptual revision.