Simplified bucketsort implementation by using {SIMPLE_ARRAY}.sequence more freely in contracts.
Did a lot of cleanup.