wf-test module and code cleanup