clean up word helper code