Finalized the Distance Matrix javascript class