Move testing code to testing module.