Update handling of function pointers and provide helper functions