Some cleanup
BTrees and ranks