Ported perlinNoise to C. Removed old stuff.