Added removing playername on window closing.