removed unused code
removed more unused code, and added javadoc to map.java