Moved alias code from tests/testdai.cpp to src/alldai.cpp