Avoid modulo division in TR_GETC()
Remove depth argument from trsort()
Implement Utils.med5()
Implement Utils.med3()