added linenumbers and custom close dialog