Added window.close; closes #141.