Extracted the gigantic anonymous inner class in a class