lots and lots of glitch fixes