Add ability to remove periodically called functions and to unregister api functions(that can be called by the server)