Added an app delegate and custom window.