Progress on performance branch

More than half tests passing (though more tests needed).
Progress

Inverted section works