also made map class and spruced around some comments