Move tests, fix test040