Improve editor close (automatically stops server)