Change ViewCast to be a static helper