App delegate replaced with swift version