Added _calculateHeatmapGeometry() and removed unused functions