AppDelegate ported to swift. main removed.