Majority is written

Still largely untested.