Added map window and some logic