Refactored WCFR code - mostly moved code.