Close document after write to fix readystate bugs
Add Luke's Restaurant example