Changed to use UIWindow