Cleanup and additional test based on PR feedback