#KJ-55 Local classes - transform them into inner classes. Implemented the first 3 points of the plan.