Added extract uniforms method to uniform utils.