Cleanup of CT testing code