This can seem a lot but the only modifications here were adding the function `checkDataUsageNotification()` and wrapping the former code in `CostControl.getInstance()` before registering the handlers to factor out this functionality.