Added in parsing of functions

Modified ToRPN to correctly parse functions