Better code organisation in AppDelegate.m