Cleanup of tests code