Removed bugs in the mutation code, fixed a bug where no children were added to the nodes if the children variable was undefined(ack)