Added code for distance and co-integration tests