Merge pull request #671 from dorkster/missing_data

Only clear intermap teleport flag when the destination name is empty
Fix memory leaks
Merge pull request #673 from stefanbeller/memleaks

Fix memory leaks