fix bug in spectral decomposition

the barrier function was not being computed correctly for negative
energies.

Also, the cutting edge calculation was falsly assuming that there was no
branching in the tree
start to add preconditioning

it's not working yet.