Fixed nasty memory leak; added ability to remove keys from TMap.