Added map and some cleanup