Add better testing, fix edge case bug in removal