Functions

Translation of functions from AST to SAST is now working.  
since this is only used in check_funcs, maybe declare it within that block?