added map tab + some refactoring