Move testing code into testing module.