Free more memory in desktop_delete()
Code cleanup