added map to main tab and some code formatting