Refactoring in classes. Improvements in build.gradle.