moved gesture, window and root view controller into private method that sets up shared instance