- renamed variables to make more abstracted (e.g. globalmap to map)