Writing classes for graphics and map.