Might be more readable to not have this as an anonymous class, even if it's just a nested one.