Restructured to match the android version.