Migrated to Android Studio, some refactoring.