Heightmap code cleanup

Renamed some variables to be more correct