Add code to function stubs