Migration to Android Studio 1.0 and code rearrange