Mostly feature complete.

Tested everything except sorting.