Still broken

Fixed unbalanced terms and some reshape errors. Still not returning
correct solutions.