General function parser and representation working
Added guard against incorrect object creation.