refactoring extracting classes. Gradle build