Modified to parse custom functions. (Incomplete)