Implemented parsing of functions
Removed pt2function from todo!