Moved code to heightmap class, added texture generation.