Modified Perlin slightly and also shadow alg refactoring