Added function to get the map size, and fixed a stupid material bug.