Fix some static references to attributes.

Pass metadata through Var.__init__() instead.