Minor improvement to anonymous classes