Fix a memory leak.
Clean up a little.
Make mapmodelinfo a class.