Changed the way functions are stored in the tree

Before, functions nodes had child nodes name and argument. This has
changed to left and right for overall consistency