Moved BroadcastReceiver to private inner class. Reordered some fields