Refactor gitignore and build.gradle