KH-203: Refactor anonymous class to nested