test cleanup and improvement