continued refactoring

continued refactoring. in the middle of implementing the Android
control method.