Added unit tests, changed map centering to max/min