Lots of fixes and optimizations. Buffers for perlin flow and buttons.