ShaderManager implemenration and some fixes in TableHash