Merge pull request #164 from LordSk/minimap-fixes

Minimap cleanup and fixes
Fix debug compile
moved reccurent code to dedicated methods