Revert "switching to use of anonymous module for dynamic method definition"

This reverts commit 2c8d8323507b1c6dff32255d1cdbb8e3fdfe65af.