deprecated d* functions, added few tests, cleaned up ArrayDist