Fixes on perlinnoise and demo.

perlinnoise still not functional though.