Preparing for function calls and callbacks