Added close button to template, and close on escape.