Realtime Map and some refactoring