Update to build with Android Studio 0.4.0, improve performance of handling incoming messages