Refactored Shader.

Added streamutils.