Avoiding globals much as possible
Fix indentation
Prefix globals
Ignore error and fix leak
Using path extension is better
Macro-ing setting HALO_MAPS_COUNT.
I think this should be Danger Canyon..
Fixing string formatting warnings
Fix warning where function prototype not declared