hide menu, remove trailing spaces on save