dead code cleanup
re-enabled preference for 'total' cost over 'cost' in update function
splice operation will now look for a 'selected' property on child nodes. If selected resolves to true, child is added to the new branch
fixed behaviour relating to adding/removing parent nodes when children are left selected. Now removes entire branch when root of that branch is deselected, and readds children of the root that are left selected if/when root is re-selected