Added map and coordinate mapping code