Can be easily fixed by turning the anonymous declaration into an inner class. No need for it outside this class, and improves readability of this code. Also, it forces you to document what it does. These are functions, but have never been documented.