Decent version of called_functions
complete rewrite of the functions previously using regex, now with R parse tree