add close/new tab button
- fix to save the command history from side editor
- cleanup code
- minor fix