Cleaner code

One broadcast receiver can handle both intents to reduce memory usage, etc.