Removing code from main (just tests now), adding map debug function