refactor code to generate empty function tables