Implemented basic mapping functionality.
Need to implement some error avoiding.