Added background refresh to set the offline status;
Added canceling local notifications;
Small fixes;