Updated shader system; lots of bug fixes.