Added functions GetFunction and SetFunction