bws-unlink-buffer improved

to save the minor mode list and kill the buffer