Add functions to the event loop.