Refactoring DynamicFunctionTable and DynamicFunction